from sklearn.datasets import fetch_20newsgroups
NewsClass = ['rec.sport.baseball','rec.sport.hockey']
DataTrain = fetch_20newsgroups(subset='train',categories=NewsClass,shuffle=True,random_state=42)
print(DataTrain.target_names)